package com.xyf.blog.web;

import org.omg.CosNaming.NamingContextPackage.NotFound;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class indexController {

    @GetMapping("/")
    public  String index(){
//        String blog =null;
//        if (blog==null){
////            自定义一个异常,异常是要抛出的，而不是return的
//            throw  new NotFoundException("博客不存在");
//        }

        return "index";
    }
}
